home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / usr / include / pidgin / gtkplugin.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-05-04  |  2.2 KB  |  80 lines

  1. /**
  2.  * @file gtkplugin.h GTK+ Plugin API
  3.  * @ingroup pidgin
  4.  *
  5.  * pidgin
  6.  *
  7.  * Pidgin is the legal property of its developers, whose names are too numerous
  8.  * to list here.  Please refer to the COPYRIGHT file distributed with this
  9.  * source distribution.
  10.  *
  11.  * This program is free software; you can redistribute it and/or modify
  12.  * it under the terms of the GNU General Public License as published by
  13.  * the Free Software Foundation; either version 2 of the License, or
  14.  * (at your option) any later version.
  15.  *
  16.  * This program is distributed in the hope that it will be useful,
  17.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19.  * GNU General Public License for more details.
  20.  *
  21.  * You should have received a copy of the GNU General Public License
  22.  * along with this program; if not, write to the Free Software
  23.  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  24.  */
  25. #ifndef _PIDGINPLUGIN_H_
  26. #define _PIDGINPLUGIN_H_
  27.  
  28. #include "pidgin.h"
  29. #include "plugin.h"
  30.  
  31. typedef struct _PidginPluginUiInfo PidginPluginUiInfo;
  32.  
  33. /**
  34.  * A GTK+ UI structure for plugins.
  35.  */
  36. struct _PidginPluginUiInfo
  37. {
  38.     GtkWidget *(*get_config_frame)(PurplePlugin *plugin);
  39.  
  40.     int page_num;                                         /**< Reserved */
  41.  
  42.     /* padding */
  43.     void (*_pidgin_reserved1)(void);
  44.     void (*_pidgin_reserved2)(void);
  45.     void (*_pidgin_reserved3)(void);
  46.     void (*_pidgin_reserved4)(void);
  47. };
  48.  
  49. #define PIDGIN_PLUGIN_TYPE PIDGIN_UI
  50.  
  51. #define PIDGIN_IS_PIDGIN_PLUGIN(plugin) \
  52.     ((plugin)->info != NULL && (plugin)->info->ui_info != NULL && \
  53.      !strcmp((plugin)->info->ui_requirement, PIDGIN_PLUGIN_TYPE))
  54.  
  55. #define PIDGIN_PLUGIN_UI_INFO(plugin) \
  56.     ((PidginPluginUiInfo *)(plugin)->info->ui_info)
  57.  
  58. /**
  59.  * Returns the configuration frame widget for a GTK+ plugin, if one
  60.  * exists.
  61.  *
  62.  * @param plugin The plugin.
  63.  *
  64.  * @return The frame, if the plugin is a GTK+ plugin and provides a
  65.  *         configuration frame.
  66.  */
  67. GtkWidget *pidgin_plugin_get_config_frame(PurplePlugin *plugin);
  68.  
  69. /**
  70.  * Saves all loaded plugins.
  71.  */
  72. void pidgin_plugins_save(void);
  73.  
  74. /**
  75.  * Shows the Plugins dialog
  76.  */
  77. void pidgin_plugin_dialog_show(void);
  78.  
  79. #endif /* _PIDGINPLUGIN_H_ */
  80.